Product Code Database
Example Keywords: grand theft -data $70-135
   » » Wiki: Fork Bomb
Tag Wiki 'Fork Bomb'.
Tag

In , a fork bomb (also called rabbit virus) is a denial-of-service (DoS) attack wherein a process continually replicates itself to deplete available system resources, slowing down or crashing the system due to resource starvation.


History
Around 1978, an early variant of a fork bomb called wabbit was reported to run on a System/360. It may have descended from a similar attack called RABBITS reported from 1969 on a Burroughs 5500 at the University of Washington.


Implementation
Fork bombs operate both by consuming CPU time in the process of forking, and by saturating the 's process table.
(2025). 9780470023242, John Wiley & Sons.
(2025). 9781602670006
A basic implementation of a fork bomb is an that repeatedly launches new copies of itself.

In -like operating systems, fork bombs are generally written to use the fork . As forked processes are also copies of the first program, once they resume execution from the next address at the , they continue forking endlessly within their own copy of the same infinite loop. this has the effect of causing an exponential growth in processes. As modern generally use a resource management technique when forking new processes,

(2025). 9780070611948, McGraw-Hill Higher Education.
a fork bomb generally will not saturate such a system's memory.

Microsoft Windows operating systems do not have an equivalent functionality to the Unix fork system call;

(2025). 9781565926219, "O'Reilly Media, Inc.".
a fork bomb on such an operating system must therefore create a new process instead of forking from an existing one, such as with echo %0^|%0 > $_.cmd & $_. In this batch script, %0|%0 is written to $_.cmd, which is then executed by & $_.

A classic example of a fork bomb is one written in :(){ :|:& };:, possibly dating back to 1999, which can be more easily understood as fork() {

   fork | fork &
     
} fork In it, a function is defined (<nowiki></nowiki>) as calling itself (fork()), then piping (fork) its result into itself, all in a background job (|).

The code using a colon & as the function name is not valid in a shell as defined by POSIX, which only permits and underscores in function names. However, its usage is allowed in as an extension.


Prevention
As a fork bomb's mode of operation is entirely encapsulated by creating new processes, one way of preventing a fork bomb from severely affecting the entire system is to limit the maximum number of processes that a single user may own. On Linux, this can be achieved by using the ulimit utility; for example, the command : would limit the affected user to a maximum of thirty owned processes.
(2025). 9781430319306
On PAM-enabled systems, this limit can also be set in ulimit -u 30,
(2025). 9780071767590, McGraw Hill Professional.
and on *BSD, the system administrator can put limits in /etc/security/limits.conf.
(2025). 9781593271510, No Starch Press.
Modern Linux systems also allow finer-grained fork bomb prevention through and process number (PID) controllers.


See also
  • Billion laughs attack
  • Deadlock (computer science)
  • Time bomb (software)


External links

Page 1 of 1
1
Page 1 of 1
1

Account

Social:
Pages:  ..   .. 
Items:  .. 

Navigation

General: Atom Feed Atom Feed  .. 
Help:  ..   .. 
Category:  ..   .. 
Media:  ..   .. 
Posts:  ..   ..   .. 

Statistics

Page:  .. 
Summary:  .. 
1 Tags
10/10 Page Rank
5 Page Refs
1s Time